home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / jcool01.zip / TEST_TIM.C < prev    next >
C/C++ Source or Header  |  1992-08-12  |  1KB  |  36 lines

  1. //
  2. // Copyright (C) 1991 Texas Instruments Incorporated.
  3. //
  4. // Permission is granted to any individual or institution to use, copy, modify,
  5. // and distribute this software, provided that this complete copyright and
  6. // permission notice is maintained, intact, in all copies and supporting
  7. // documentation.
  8. //
  9. // Texas Instruments Incorporated provides this software "as is" without
  10. // express or implied warranty.
  11. //
  12.  
  13. #include <misc.h>
  14. #include <cool/Timer.h>
  15. #include <test.h>
  16.  
  17. void test_timer() {
  18.   CoolTimer timer;
  19.   // Note: This is just a touch test, to ensure things at least execute.
  20.   TEST("mark", (timer.mark(), TRUE), TRUE);
  21.   TEST("all_usec", timer.all_usec()>=0, TRUE);
  22.   TEST("user_usec", timer.user_usec()>=0, TRUE);
  23.   TEST("system_usec", timer.system_usec()>=0, TRUE);
  24.   TEST("all", timer.all()>=0, TRUE);
  25.   TEST("system", timer.system()>=0, TRUE);
  26.   TEST("user", timer.user()>=0, TRUE);
  27.   TEST("real", timer.real()>=0, TRUE);
  28. }
  29.  
  30. int main (void) {
  31.   START("CoolTimer");
  32.   test_timer();
  33.   SUMMARY();
  34.   return 0;
  35. }
  36.